import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/common";

// 查询地铁信息表列表
export function listSubway(query) {
  return request({
    url: '/basic/subway/list',
    method: 'get',
    params: query
  })
}

// 查询地铁信息表详细
export function getSubway(subwayId) {
  return request({
    url: '/basic/subway/'+ parseStrEmpty(subwayId) ,
    method: 'get'
  })
}

// 新增地铁信息表
export function addSubway(data) {
  return request({
    url: '/basic/subway/create',
    method: 'post',
    data: data
  })
}

// 修改地铁信息表
export function updateSubway(subwayId,data) {
  return request({
    url: '/basic/subway/update/' + subwayId,
    method: 'post',
    data: data
  })
}

// 删除地铁信息表
export function delSubway(subwayId) {
  return request({
    url: '/basic/subway/' + subwayId,
    method: 'delete'
  })
}
